package com.junci.mtest.views.fragment;

import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;

import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.databinding.DataBindingUtil;

import com.junci.mtest.R;
import com.junci.mtest.databinding.FragmentMainBinding;
import com.junci.mtest.views.BaseFragment;

/**
 * Created by YM
 * Create Date 2024/5/1 0:46
 * Used 首页
 */
public class MainFragment extends BaseFragment {
    private static MainFragment f;
    private View view;
    public static MainFragment newInstance() {
        if (f == null) {
            f = new MainFragment();
        }
        return f;
    }

    @Nullable
    @Override
    public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
        if (view == null) {
            FragmentMainBinding binding =  DataBindingUtil.inflate(inflater, R.layout.fragment_main, container, false);
            view = binding.getRoot();
        }

        return view;

    }
}
